#ifndef FILECOB_H
#define FILECOB_H

#include <stdlib.h>
#include <time.h>
#include <stdio.h>
#include <string.h>
#include <math.h>

#include "jxmlparser.h"
#include "SolucaoGRASPCobertura.h"

//#define IN_PATH "data/entrada/"
#define IN_PATH "entrada/"
#define OUT_PATH "saida"

#define DIST_DELTA 100
#define CUSTO_BASE 65
#define CUSTO_DELTA 10

using namespace std;

class FileCobertura{
	private:
		double sqr(double d){
			return d * d;
		}
        public:
                double **distances;
		int V;
		int F;
		int p;
		double D;

                int *demanda;
                int *type;
		
		FileCobertura();
		
		double distanciaClientSteiner(int indS, int indC);

		
       	 	void loadFile(char *name);
		
		void calculateDist();

		static void printInstancia(double alpha, int n, int m, double best, double z, double tempo, int melhorTodas, int piorTodas);
        
        	static void writeXML(SolucaoGRASPCobertura *sol, long);
		static void readXML();
        
		virtual ~FileCobertura();
};

#endif
